package com.bicon.botu.mall.component.api;

import com.bicon.botu.mall.component.service.IPageContentService;
import com.bicon.botu.core.base.common.entity.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 单页字典类型
 *
 * @author 张露晨
 * @date 2017/7/8 15:23.
 */
@RestController
@RequestMapping("/V1.0.0/api/pageContext")
public class PageContentApi {

    @Autowired
    private IPageContentService IPageContentService;

    /**
     * 根据字典code查找字典
     *
     * @param dictionaryCode 字典Code
     * @return
     */
    @RequestMapping(value = "/select", method = RequestMethod.POST)
    public BaseResult select(@RequestParam(value = "dictionaryCode") String dictionaryCode) {
        return IPageContentService.select(dictionaryCode);
    }
}
